package health.lm.com.shop.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import health.lm.com.component_base.helper.ImageLoaderHelper;
import health.lm.com.shop.R;
import health.lm.com.shop.entity.HLDynamicDetailEntity;

/**
 * Created by Android Studio .
 * Project：hlian health.lm.com.home.adapter
 * Date：2019/8/12 11:17
 * Introduce：hlian
 */
public class HLDynamicDetailCommentAdapter extends BaseQuickAdapter<HLDynamicDetailEntity.CommentEntity, BaseViewHolder> {
    public HLDynamicDetailCommentAdapter(@Nullable List<HLDynamicDetailEntity.CommentEntity> data) {
        super(R.layout.hl_activity_dynamic_comment_item, data);
    }

    /**
     * Implement this method and use the helper to adapt the view to the given item.
     *
     * @param helper A fully initialized helper.
     * @param item   The item that needs to be displayed.
     */
    @Override
    protected void convert(BaseViewHolder helper, HLDynamicDetailEntity.CommentEntity item) {
        ImageLoaderHelper.getInstance().load(mContext, item.getAvatar(), helper.getView(R.id.imageView5));
        helper.setText(R.id.textView12, item.getName()).setText(R.id.textView13, item.getLikeNum())
                .setText(R.id.textView14, item.getContent()).setText(R.id.textView15, item.getTime());
    }
}
